package com.example.demo.service.impl;

import com.example.demo.common.ResponseMessage;
import com.example.demo.dao.CategoryMapper;
import com.example.demo.pojo.Category;
import com.example.demo.service.ICategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("iCategoryService")
public class CategoryServiceImpl implements ICategoryService{

    @Autowired
    CategoryMapper categoryMapper;

    @Override
    public ResponseMessage getCategoryList(){
        List<Category> list = categoryMapper.selectAll();
        ResponseMessage msg = new ResponseMessage(0,list);
        return msg;
    }
}
